<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/appmanager/employmentinformation/employment_information.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/appmanager/employmentinformation/employment_information.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '入职信息',
                name: 'employmentinformation/employment_information',
                url: "/employment_information/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"name":"","gender":"","nation":"","nativePlace":"","idNumber":"","birthday":"","education":"","AuditStatus":"","img":""});
            const editFormOptions = ref([[{"title":"姓名","required":true,"field":"name"},
                               {"dataKey":"py-gender","data":[],"title":"性别","required":true,"field":"gender","type":"select"}],
                              [{"title":"民族","required":true,"field":"nation"},
                               {"title":"籍贯","required":true,"field":"nativePlace"}],
                              [{"title":"身份证号","required":true,"field":"idNumber"},
                               {"title":"出生日期","required":true,"field":"birthday","type":"datetime"}],
                              [{"dataKey":"py-education","data":[],"title":"学历","required":true,"field":"education","type":"select"},
                               {"dataKey":"audit","data":[],"title":"审批状态","required":true,"field":"AuditStatus","type":"select"}],
                              [{"title":"照片","field":"img","type":"img"}]]);
            const searchFormFields = ref({"name":"","idNumber":"","AuditStatus":""});
            const searchFormOptions = ref([[{"title":"姓名","field":"name","type":"text"},{"title":"身份证号","field":"idNumber","type":"text"},{"dataKey":"audit","data":[],"title":"审批状态","field":"AuditStatus","type":"select"}]]);
            const columns = ref([{field:'name',title:'姓名',type:'string',width:120,require:true,align:'left',sort:true},
                       {field:'gender',title:'性别',type:'string',bind:{ key:'py-gender',data:[]},width:60,require:true,align:'left'},
                       {field:'nation',title:'民族',type:'string',width:60,require:true,align:'left'},
                       {field:'nativePlace',title:'籍贯',type:'string',width:120,require:true,align:'left'},
                       {field:'idNumber',title:'身份证号',type:'string',width:120,require:true,align:'left'},
                       {field:'birthday',title:'出生日期',type:'datetime',width:120,require:true,align:'left',sort:true},
                       {field:'education',title:'学历',type:'string',bind:{ key:'py-education',data:[]},width:60,require:true,align:'left'},
                       {field:'AuditStatus',title:'审批状态',type:'int',bind:{ key:'audit',data:[]},width:120,require:true,align:'left'},
                       {field:'img',title:'照片',type:'img',width:120,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:120,require:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',sort:true,width:120,require:true,align:'left',sort:true},
                       {field:'id',title:'id',type:'string',width:120,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
